<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>代理商信息审核</title>
	<title>用户列表</title>
    <link  rel="stylesheet" href="../../css/main.css" type="text/css" />
    <link  rel="stylesheet" href="../../css/pager.css">  
    <style type="text/css">
    body{
        height:622px;
        overflow:hidden;
    }
    </style>
	<script type="text/javascript" src='../../js/jquery/jquery-1.5.2.min.js'></script>
<script type="text/javascript">
$(document).ready(function() {
	
	$.ajax({
		url:"../../getvendorapplybypage?startIndex=10&filter=1",
		dataType:"json",
		success:function(data){
			for(i=0;i<data.length;i++){
				var check="";
				var color;
				if(data[i].status==1){
					color="<span class='red'>未审核<span>";
					check="<a href='checkClient.html'>审核</a>";
				}else if(data[i].status==2){
					color="<span class='blue'>审核未通过<span>";
				}else if(data[i].status==3){
					color="<span class='green'>审核通过<span>";
				}
				$("#container")
				.append("<tr><td align='center' width='80'><span class='blue'>"+data[i].login_name+"</span></td><td align='center' width='150'>"+data[i].title+"</td><td align='center' width='110'>"+data[i].arise_time+"</td><td align='center' width='130'>"+color+"</td><td align='center' width='110'>"+check+"</td></tr>");
			}
		}
	})
	
	$("#search").change(function(){
		var sel=$(this).val();
		$.ajax({
			url:"../../getvendorapplybypage?startIndex=1&filter="+sel,
			dataType:"json",
			success:function(data){
				$("#container").empty();
				for(i=0;i<data.length;i++){
					var check="";
					var color;
					if(data[i].status==1){
						color="<span class='red'>未审核<span>";
						check="<a href='checkClient.html'>审核</a>";
					}else if(data[i].status==2){
						color="<span class='blue'>审核未通过<span>";
					}else if(data[i].status==3){
						color="<span class='green'>审核通过<span>";
					}
					$("#container")
					.append("<tr><td align='center' width='80'><span class='blue'>"+data[i].login_name+"</span></td><td align='center' width='150'>"+data[i].title+"</td><td align='center' width='110'>"+data[i].arise_time+"</td><td align='center' width='130'>"+color+"</td><td align='center' width='110'>"+check+"</td></tr>");
				}
			}
		})
	})
	
})
</script>
</head>
<body>
    <div class="top">
        <span class='label'>审核管理</span><br/>
        <div class='list_cmd'>
            <label for='usename'>用户名：</label>
            <input id="text" name="text" class='valign' type="text" />&nbsp;&nbsp;
            <select class="valign" id="search">
              	<option value="0">全部</option>
               	<option value="1">未审核</option>
               	<option value="2">审核未通过</option>
               	<option value="3">审核已通过</option>
            </select>
            <input type='button' class='valign' value='查询'/>
        </div>
    </div>
    <table class="clstable"  cellpadding="0" cellspacing="0"  width='680'>
        <thead>
            <tr>
    		    <th align='center' width="80">申请人</th>
          		<th align='center' width='100'>申请标题</th>
    	     	<th align='center' width='200'>申请时间信息</th>
    	    	<th align='center' width='130'>状态</th>
    	    	<th align='center' width='110'>审核链接</th>
            </tr>
    	</thead>
        <tbody id="container">
        </tbody>
    </table>  
    <div class="bottom" id="js-pagerWraper"></div>
<script src="../../js/jquery/jquery-1.7.2.min.js"></script>
<script src="../../js/jquery/jquery-pag-0.1.min.js"></script>
<script src="../../js/jquery/j_templates.js"></script>
<script>
    
    $(document).ready(function(){
        /*init pager*/
        $("#js-pagerWraper").pag({pageNumber : 1, displayNumber : 7, pageCount : 15,callback:function(num){
        	var n=((new Number(num))-1)*5;
        	$.ajax({
    			url:"../../getvendorapplybypage?startIndex="+n+"&filter="+$("#search").val(),
    			dataType:"json",
    			success:function(data){
    				$("#container").empty();
    				for(i=0;i<data.length;i++){
    					var check="";
    					var color;
    					if(data[i].status==1){
    						color="<span class='red'>未审核<span>";
    						check="<a href='checkClient.html'>审核</a>";
    					}else if(data[i].status==2){
    						color="<span class='blue'>审核未通过<span>";
    					}else if(data[i].status==3){
    						color="<span class='green'>审核通过<span>";
    					}
    					$("#container")
    					.append("<tr><td align='center' width='80'><span class='blue'>"+data[i].login_name+"</span></td><td align='center' width='150'>"+data[i].title+"</td><td align='center' width='110'>"+data[i].arise_time+"</td><td align='center' width='130'>"+color+"</td><td align='center' width='110'>"+check+"</td></tr>");
    				}
    			}
    		})
        }});
        });
    
</script>
</body>
</html>
